<c:if test="true"
  xmlns="http://www.w3.org/1999/xhtml"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:c="http://java.sun.com/jstl/core"
  xmlns:nxl="http://nuxeo.org/nxforms/layout"
  xmlns:nxu="http://nuxeo.org/nxweb/util"
  xmlns:nxp="http://nuxeo.org/nxweb/pdf"
  xmlns:a4j="http://richfaces.org/a4j"
  xmlns:s="http://jboss.org/schema/seam/taglib">
  <c:set var="isEmpty" value="#{widgetProperty_isEmpty}" />
  <c:set var="emptyMessage" value="#{nxu:test(empty widgetProperty_emptyMessage, '', widgetProperty_emptyMessage)}" />
  <c:if test="#{nxl:isLikePlainMode(widget.mode)}">
    <c:if test="#{not isEmpty}">
      <nxl:subWidget>
        <nxl:widget widget="#{widget}" value="#{fieldOrValue}" />
      </nxl:subWidget>
    </c:if>
    <c:if test="#{isEmpty}"><h:outputText value="#{messages[widgetProperty_emptyMessage]}" /></c:if>
  </c:if>
  <c:if test="#{widget.mode == 'pdf'}">
    <nxp:html>
      <c:if test="#{not isEmpty}">
        <nxl:subWidget>
          <nxl:widget widget="#{widget}" value="#{fieldOrValue}" />
        </nxl:subWidget>
      </c:if>
      <c:if test="#{isEmpty}"><h:outputText value="#{messages[widgetProperty_emptyMessage]}" /></c:if>
    </nxp:html>
  </c:if>
  <c:if test="#{not nxl:isLikePlainMode(widget.mode) and widget.mode != 'pdf'}">
    <c:set var="cannotDrop" value="#{widgetProperty_cannotDrop}" />

    <c:if test="#{cannotDrop}">
      <div class="#{widgetProperty_styleClass}">
        <c:if test="#{not isEmpty}">
          <nxl:subWidget>
            <nxl:widget widget="#{widget}" value="#{fieldOrValue}" />
          </nxl:subWidget>
        </c:if>
        <c:if test="#{isEmpty}"><h:outputText value="#{messages[widgetProperty_cannotDropMessage]}" /></c:if>
      </div>
    </c:if>
    <c:if test="#{not cannotDrop}">
      <div class="dropzone #{widgetProperty_styleClass}" id="#{widget.id}_dropzone" context="#{widgetProperty_dropContext}">
        <c:if test="#{not isEmpty}">
          <nxl:subWidget>
            <nxl:widget widget="#{widget}" value="#{fieldOrValue}" />
          </nxl:subWidget>
        </c:if>
        <c:if test="#{isEmpty}"><h:outputText value="#{messages[widgetProperty_emptyMessage]}" /></c:if>
      </div>
    </c:if>

  </c:if>
</c:if>
